const mongoose = require("./db")

const loginShema = mongoose.Schema({
    loginname:String,
    password:String
})
const loginModel = mongoose.model('login',loginShema,'login')

const userShema = mongoose.Schema({
    username:String,
    niname:String,
    division:String,
    iphone:String,
    status:String,
    time:String
})
const userModel = mongoose.model('user',userShema,'user')

const roleShema = mongoose.Schema({
    rolename:String,
    power:String,
    pai:String,
    status:String,
    time:String,
})
const roleModel = mongoose.model('role',roleShema,'role')

const menuShema = mongoose.Schema({
    menuname:String,
    biao:String,
    pai:String,
    power:String,
    lu:String,
    status:String,
    time:String,
})
const menuModel = mongoose.model('menu',menuShema,'menu')

const divisionShema = mongoose.Schema({
    division:String,
    pai:String,
    status:String,
    time:String,
})
const divisionModel = mongoose.model('division',divisionShema,'division')

const postShema = mongoose.Schema({
    bian:String,
    post:String,
    pai:String,
    status:String,
    time:String,
})
const postModel = mongoose.model('post',postShema,'post')

const dictShema = mongoose.Schema({
    bian:String,
    dict:String,
    class:String,
    zhu:String,
    time:String,
})
const dictModel = mongoose.model('dict',dictShema,'dict')

const parameterShema = mongoose.Schema({
    parameter:String,
    name:String,
    zhi:String,
    status:String,
    zhu:String,
    time:String,
})
const parameterModel = mongoose.model('parameter',parameterShema,'parameter')

const noticeShema = mongoose.Schema({
    noticename:String,
    class:String,
    status:String,
    name:String,
    time:String,
})
const noticeModel = mongoose.model('notice',noticeShema,'notice')

const onlineShema = mongoose.Schema({
    bian:String,
    onlinename:String,
    dename:String,
    host:String,
    browser:String,
    system:String,
    time:String,
})
const onlineModel = mongoose.model('online',onlineShema,'online')

const timeShema = mongoose.Schema({
    bian:String,
    timename:String,
    zuname:String,
    character:String,
    expression:String,
    status:String,
})
const timeModel = mongoose.model('time',timeShema,'time')


module.exports = {
    loginModel,userModel,roleModel,menuModel,divisionModel,postModel,dictModel,parameterModel,noticeModel,onlineModel,timeModel
}